<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
      <h3>Books Page</h3>
      <a href="book.jsp?book=JavaWeb">JavaWeb</a><br>
      <a href="book.jsp?book=Java">Java</a><br>
      <a href="book.jsp?book=Oracle">Oracle</a><br>
      <a href="book.jsp?book=Ajax">Ajax</a><br>
      <a href="book.jsp?book=JavaScript">JavaScript</a><br>
      <a href="book.jsp?book=Android">Android</a><br>
      <a href="book.jsp?book=Jbpm">Jbpm</a><br>
      <a href="book.jsp?book=Struts">Struts</a><br>
      <a href="book.jsp?book=Hibernate">Hibernate</a><br>
      <a href="book.jsp?book=Spring">Spring</a><br>
      <h5>最近浏览</h5>
      <%
        Cookie[] cookies=request.getCookies();
        if(cookies!=null&&cookies.length>0){
        	for(Cookie c:cookies){
        		if(c.getName().startsWith("BOOK_NAME")){
        			out.println(c.getValue()+"\n");
        		}
        	}
        }
      %>
</body>
</html>